﻿namespace JxcLite.Services;

/// <summary>
/// 系统库存管理模块服务接口。
/// </summary>
public interface IInventoryService : IService
{
    /// <summary>
    /// 分页查询商品库存信息。
    /// </summary>
    /// <param name="criteria"></param>
    /// <returns></returns>
    Task<PagingResult<InventoryInfo>> QueryInventoriesAsync(PagingCriteria criteria);
}

class InventoryService(Context context) : ServiceBase(context), IInventoryService
{
    public Task<PagingResult<InventoryInfo>> QueryInventoriesAsync(PagingCriteria criteria)
    {
        return InventoryRepository.QueryInventoriesAsync(Database, criteria);
    }
}